package com.plugin.sproutcore.util;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

public final class SWTUtil 
{
	public static final Label createSeparator(final Composite container, 
			final int numColumns)
	{
		final Label separator = new Label(container, SWT.SEPARATOR | SWT.HORIZONTAL );
		final GridData gd = new GridData(GridData.FILL_HORIZONTAL);
		gd.horizontalSpan = numColumns;
		gd.heightHint = 10;
		separator.setLayoutData(gd);
		return separator;
	}
	
	public static final Text createText(final Composite container, 
			Object layoutData)
	{
		Text text = new Text(container, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY);
		if (layoutData != null) {
			text.setLayoutData(layoutData);
		}
		return text;
	}
}
